package com.apollographql.apollo.api;

import java.io.File;
import java.io.IOException;

import com.kt.Metadata;
import com.kt.jvm.internal.Intrinsics;
import okio.BufferedSink;
import okio.Okio;

@Metadata(bv = {1, 0, 3}, d1 = {"\u0000%\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H\u0016J\u0010\u0010\u0004\u001a\n \u0006*\u0004\u0018\u00010\u00050\u0005H\u0016J\u0010\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\nH\u0016¨\u0006\u000b"}, d2 = {"com/apollographql/apollo/api/FileuploadKt$create$1", "Lcom/apollographql/apollo/api/FileUpload;", "contentLength", "", "fileName", "", "com.kt.jvm.PlatformType", "writeTo", "", "sink", "Lokio/BufferedSink;", "apollo-api"}, k = 1, mv = {1, 4, 0})
/* compiled from: fileupload.kt */
public final class FileuploadKt$create$1 extends FileUpload {
    final /* synthetic */ File $file;
    final /* synthetic */ String $mimetype;

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    FileuploadKt$create$1(File $captured_local_variable$0, String $captured_local_variable$1, String $super_call_param$2) {
        super($super_call_param$2, null, 2, null);
        this.$file = $captured_local_variable$0;
        this.$mimetype = $captured_local_variable$1;
    }

    @Override // com.apollographql.apollo.api.FileUpload
    public long contentLength() {
        return this.$file.length();
    }

    @Override // com.apollographql.apollo.api.FileUpload
    public String fileName() {
        return this.$file.getName();
    }

    @Override // com.apollographql.apollo.api.FileUpload
    public void writeTo(BufferedSink sink) {
        Intrinsics.checkParameterIsNotNull(sink, "sink");
        try {
            sink.writeAll(Okio.buffer(Okio.source(this.$file)));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
